<?php
class Admin_Form_AddCruiseItineraryTour extends Admin_Form_AddArticle {
	public function init() {
		$dataMaper = new M_Tool_DataMapper();

		$title = new Zend_Form_Element_Text('title');
		$enTitle = new Zend_Form_Element_Text('en_title');

		
		$tbCruise = new M_DbTable_Cruise();
		$cruise   = new Zend_Form_Element_Select(
				'cruise_id',
				array('label'		 => 'Cruise',
					  'required'	 => true,
					  'multiOptions' => $dataMaper->mapKeyValue($tbCruise->getList(),'id', 'en_name')));
		
		$tbCruiseItinerary = new M_DbTable_CruiseItinerary();
		$cruiseItinerary   = new Zend_Form_Element_Select(
				'cruise_itinerary_id',
				array('label'		 => "Cruise's itinerary",
					  'required'	 => true,
					  'multiOptions' => $dataMaper->mapKeyValue($tbCruiseItinerary->getList(),'id', 'en_code')));

		$specialOffer 	  = new Zend_Form_Element_Select(
		        'special_offer',
		        array('label'		 => 'Promotion',
		              'multiOptions' => array(0 => 'No', 1 => 'Yes')));
		
		$bestSelling 	  = new Zend_Form_Element_Select(
		        'best_selling',
		        array('label'		 => 'Best selling',
		              'multiOptions' => array(0 => 'No', 1 => 'Yes')));

		$description = new Zend_Form_Element_Textarea(
				'description',
				array('label' 		=> 'Description'));

		$thumbnail = new Zend_Form_Element_File(
				'thumbnail',
				array('label' => 'Thumbnail'));
		
		$metaKeyWord = new Zend_Form_Element_Textarea(
				'meta_keyword',
				array('label' 		=> 'Meta keyword'));
		
		$metaDescription = new Zend_Form_Element_Textarea(
				'meta_description',
				array('label' 		=> 'Meta description'));
		$headerTitle = new Zend_Form_Element_Textarea(
				'header_title',
				array('label' 		=> 'Header title'));

		$this->addElement($cruise)
			 ->addElement($cruiseItinerary)
			 ->addElement($specialOffer)
			 ->addElement($bestSelling)
			 ->addElement($title)
			 ->addElement($enTitle)
			 ->addElement($thumbnail)
			 ->addElement($metaKeyWord)
			 ->addElement($metaDescription)
			 ->addElement($headerTitle);

		parent::init();

		$this->setLegend("Add New Cruise Tour");
		$this->addActionGroup()
			 ->makeup();
	}
}